<?php
	/*
	 * Booking_model
	 * @author: Tran Van Thanh
	 * Email  : thanhtran@vietnambiz.com
	 * Date:	07/09/2011
	 */
class Booking_model extends MY_Model{

	function __construct()
	{
		parent::__construct();		
	}
	
	function check_code_products($code_pro = null)
	{
		$q  =   $this->db->select()->from("products")->where('code',$code_pro)->get();
        if($q->row())
        {
        	return true;
        }
        else
        {
        	return false;
		}
	}
	
	function get_products_info_by_code($code_pro)
	{
		$q  =   $this->db->select()->from("products")->where('code',$code_pro)->get();
		return $q->row();
	}
}